#! /bin/sh

APP_DIR="/usr/local/bin"
LIB_DIR="/usr/lib"


if echo $(dpkg -l | grep "libreadline6-dev"); then
    echo "install shared object lib:readline......"
    sudo apt-get install libreadline6-dev
else
    echo "no need install readline.."
fi

if echo $(dpkg -l | grep "sqlite3"); then
    echo "install shared object lib:sqlite3......"
    sudo apt install sqlite3
else
    echo "no need install sqlite3.."
fi

#install application
sudo cp ../app/just_do_it $APP_DIR

#install shared lib
sudo cp ../app/libJustDoIt.so $LIB_DIR